#ifndef AC_COMMON_BASIC_LIST_HPP_
#define AC_COMMON_BASIC_LIST_HPP_

#include <list>

template <typename T>
class BasicList
{
    typedef std::list<T> List;
public:
    typedef typename List::iterator         iterator;
    typedef typename List::const_iterator   const_iterator;
    typedef typename List::size_type        size_type;

    bool empty() {return data_.empty();}
    void clear() {data_.clear();}
    size_type size() {return data_.size();}
    iterator begin() {return data_.begin();}
    iterator end() {return data._end();}
    const_iterator begin() const {return data_.begin();}
    const_iterator end() const {return data_.end();}
    void push_front(const T& item) {data_.push_front(item);}
    void pop_front() {data_.pop_front();}
    T& front() {return data_.front();}
    const T& front() const {return data_.front();}
    void swap(BasicList& other) {data_.swap(other.data_);}
    void sort() {data_.sort();}
    
    template <class Pred>
    void sort(Pred pr) {data_.sort(pr);}

    void splice_into(BasicList& other, iterator prev, iterator cur)
    {
        data_.splice(data_.begin(), other.data_, cur);
    }
private:
    
    List data_;
};

#endif  // AC_COMMON_BASIC_LIST_HPP_
